<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenLoong Dynamics Control: bezier_1D.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OpenLoong Dynamics Control
   &#160;<span id="projectnumber">v0.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">bezier_1D.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">This is part of OpenLoong Dynamics Control, an open project for the control of biped robot,</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">Copyright (C) 2024 Humanoid Robot (Shanghai) Co., Ltd, under Apache 2.0.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">Feel free to use in any purpose, and cite OpenLoong-Dynamics-Control in any style, to contribute to the advancement of the community.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> &lt;https://gitee.com/panda_23/openloong-dyn-control.git&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> &lt;web@openloong.org.cn&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="classBezier__1D.html">   16</a></span>&#160;<span class="keyword">class </span><a class="code" href="classBezier__1D.html">Bezier_1D</a> {</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classBezier__1D.html#a36e64027940c12bc42d9a0bf25cf6cbf">   19</a></span>&#160;    std::vector&lt;double&gt; <a class="code" href="classBezier__1D.html#a36e64027940c12bc42d9a0bf25cf6cbf">P</a>;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classBezier__1D.html#a3dca1ff18fe9dd8fb31e582781dbbbe1">factorial</a>(<span class="keywordtype">int</span> num);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classBezier__1D.html#a494ac4b27916733740232e37d8da08fb">nchoosek</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">int</span> k);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classBezier__1D.html#a2f0a069e38bf26c79f1b545f62f6da04">getOut</a>(<span class="keywordtype">double</span> s);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;};</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassBezier__1D_html_a494ac4b27916733740232e37d8da08fb"><div class="ttname"><a href="classBezier__1D.html#a494ac4b27916733740232e37d8da08fb">Bezier_1D::nchoosek</a></div><div class="ttdeci">double nchoosek(int n, int k)</div><div class="ttdoc">calculate the combination number n choose k or C_{n}^{k} = n! / (k!(n-k)!)</div><div class="ttdef"><b>Definition:</b> <a href="bezier__1D_8cpp_source.html#l00026">bezier_1D.cpp:26</a></div></div>
<div class="ttc" id="aclassBezier__1D_html_a3dca1ff18fe9dd8fb31e582781dbbbe1"><div class="ttname"><a href="classBezier__1D.html#a3dca1ff18fe9dd8fb31e582781dbbbe1">Bezier_1D::factorial</a></div><div class="ttdeci">double factorial(int num)</div><div class="ttdoc">calculate the factorial of an interger</div><div class="ttdef"><b>Definition:</b> <a href="bezier__1D_8cpp_source.html#l00014">bezier_1D.cpp:14</a></div></div>
<div class="ttc" id="aclassBezier__1D_html_a36e64027940c12bc42d9a0bf25cf6cbf"><div class="ttname"><a href="classBezier__1D.html#a36e64027940c12bc42d9a0bf25cf6cbf">Bezier_1D::P</a></div><div class="ttdeci">std::vector&lt; double &gt; P</div><div class="ttdoc">a sequence of number used to generate a one-dimesionanl Bezier curve</div><div class="ttdef"><b>Definition:</b> <a href="bezier__1D_8h_source.html#l00019">bezier_1D.h:19</a></div></div>
<div class="ttc" id="aclassBezier__1D_html_a2f0a069e38bf26c79f1b545f62f6da04"><div class="ttname"><a href="classBezier__1D.html#a2f0a069e38bf26c79f1b545f62f6da04">Bezier_1D::getOut</a></div><div class="ttdeci">double getOut(double s)</div><div class="ttdoc">Get the value in s.</div><div class="ttdef"><b>Definition:</b> <a href="bezier__1D_8cpp_source.html#l00032">bezier_1D.cpp:32</a></div></div>
<div class="ttc" id="aclassBezier__1D_html"><div class="ttname"><a href="classBezier__1D.html">Bezier_1D</a></div><div class="ttdoc">This class can be used to constructed a 1-dimensional Bezier curve.</div><div class="ttdef"><b>Definition:</b> <a href="bezier__1D_8h_source.html#l00016">bezier_1D.h:16</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
